﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ebookstore
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void signIn(object sender, EventArgs e)
        {
            if (usernameTextBox.Text == "hades" && passwordTextBox.Text == "1595")
            {
                Session["user"] = usernameTextBox.Text;
                Response.Redirect("Default.aspx");
            }
            else if (usernameTextBox.Text == "admin" && passwordTextBox.Text == "admin")
            {
                Session["user"] = usernameTextBox.Text;
                Response.Redirect("Default.aspx");
            }
            else
            {
                infoLabel.ForeColor = System.Drawing.Color.Red;
                infoLabel.Text = "Wrong username or password";
            }
        }
        protected void signUp(object sender, EventArgs e)
        {

        }
    }
}